package com.caojing.syby.ui.home;

import com.caojing.syby.base.IBaseModel;
import com.caojing.syby.base.IBasePresenter;
import com.caojing.syby.base.IBaseView;
import com.caojing.syby.bean.home.HomeGvBean;
import com.caojing.syby.bean.home.HomeTodayBean;
import com.caojing.syby.bean.home.HomeVpBean;
import com.caojing.syby.httputils.HttpUtils;

import java.util.HashMap;
import java.util.List;

/**
 * Created by CaoJing on 2016/10/5.
 */
public class HomeContract {
    public interface Model extends IBaseModel{
        /*viewpager的数据加载*/
        void getVpBean(HttpUtils.HttpCallBack<HomeVpBean> homeVpBeanHttpCallBack);
        /*中间视图数据的加载*/
        void getTodayBean(HttpUtils.HttpCallBack<List<HomeTodayBean>> listHttpCallBack);
        /*下面gridview的数据加载*/
        void getGvBean(HashMap<String,String> params, HttpUtils.HttpCallBack<HomeGvBean> homeGvBeanHttpCallBack);
    }
    public interface  View extends IBaseView{
        /*vp成功或失败*/
        void onSuccessGetVp(HomeVpBean homeVpBean);
        void onFailGetVp(String msg);
        /*中间视图加载成功或失败*/
        void onSuccessGetToday(List<HomeTodayBean> list);
        void onFailGetToday(String msg);
        /*下面gridview的数据加载成功或失败*/
        void onSuccessGetGv(HomeGvBean homeGvBean);
        void onFailGetGv(String msg);
    }
    public interface Presenter extends IBasePresenter{
        /*加载vp数据方法*/
        void initVpData();
        /*加载中间视图的方法*/
        void initTodayData();
        /*加载gridview的方法*/
        void initGvData(HashMap<String,String> params);
    }
}
